using Orchard;
using Orchard.UI.Resources;

namespace PJS.Bootstrap {
    public class ResourceManifest : IResourceManifestProvider {
        private readonly IOrchardServices _orchardServices;
        public ResourceManifest(IOrchardServices orchardServices)
        {
            _orchardServices = orchardServices;
        }

        public void BuildManifests(ResourceManifestBuilder builder) {
            var manifest = builder.Add();
            var currentCulture = _orchardServices.WorkContext.CurrentCulture;

            manifest.DefineScript("jQuery2.1").SetUrl("jquery-2.1.1.min.js", "jquery-2.1.1.js");

            manifest.DefineScript("Bootstrap").SetUrl("bootstrap-3.1.1/js/bootstrap.min.js", "bootstrap-3.1.1/js/bootstrap.js").SetDependencies("jQuery2.1");
            manifest.DefineScript("HoverDropdown").SetUrl("hover-dropdown.js").SetDependencies("Bootstrap");
            manifest.DefineScript("Custom").SetUrl("custom.js").SetDependencies("jQuery2.1");
            manifest.DefineScript("Theme-ValidationEngine-en").SetUrl("validationEngine/jquery.validationEngine.js").SetCultures(currentCulture).SetVersion("2.6.2").SetDependencies("jQuery2.1");
            manifest.DefineScript("Theme-ValidationEngine").SetUrl("validationEngine/jquery.validationEngine.js").SetVersion("2.6.2").SetDependencies("ValidationEngine-en");
            manifest.DefineScript("Isotope").SetUrl("isotope/jquery.isotope.min.js").SetVersion("1.5.25").SetDependencies("jQuery2.1");
            manifest.DefineScript("prettyPhoto").SetUrl("prettyPhoto/jquery.prettyPhoto.min.js").SetVersion("3.1.5").SetDependencies("jQuery2.1");

            manifest.DefineStyle("prettyPhoto").SetUrl("prettyPhoto/prettyPhoto.css");
            manifest.DefineScript("jQuery-UI").SetUrl("jquery-ui-1.10.4.min.js", "jquery-ui-1.10.4.js").SetDependencies("jQuery2.1");
            manifest.DefineScript("jQuery-Unobtrusive").SetUrl("jquery.unobtrusive-ajax.min.js", "jquery.unobtrusive-ajax.js").SetDependencies("jQuery2.1");
            manifest.DefineScript("jQuery-Validate").SetUrl("jquery.validate.js", "jquery.validate.min.js").SetDependencies("jQuery2.1");
            manifest.DefineScript("jQuery-Validate-Addons").SetUrl("additional-methods.min.js", "additional-methods.min.js").SetDependencies("jQuery2.1");
            manifest.DefineScript("Modernizr").SetUrl("modernizr-2.7.2.js", "modernizr-2.7.2.js").SetDependencies("jQuery2.1");
            manifest.DefineScript("Sammy").SetUrl("sammy-0.7.4.js", "sammy-0.7.4.js").SetDependencies("jQuery2.1");
            manifest.DefineScript("Routing").SetUrl("routing.js", "routing.js").SetDependencies("Sammy");
        }
    }
}
